package systems.events 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	
	/**
	 * @author Humberto Anjos
	 */
	public class CollisionEvent extends Event 
	{
		public static const SHIP_AND_ENEMY:String = "systems.events.CollisionEvent:SHIP_AND_ENEMY"
		public static const SHIP_AND_BULLET:String = "systems.events.CollisionEvent:SHIP_AND_BULLET"
		public static const ENEMY_AND_BULLET:String = "systems.events.CollisionEvent:ENEMY_AND_BULLET"
		
		private var _left:MovieClip
		private var _right:MovieClip
		
		public function CollisionEvent(type:String, left:MovieClip, right:MovieClip, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			this._left = left
			this._right = right
		} 
		
		public override function clone():Event 
		{ 
			return new CollisionEvent(type, _left, _right, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("CollisionEvent", "type", "left", "right", "bubbles", "cancelable", "eventPhase"); 
		}
		
		public function get left():MovieClip { return _left }
		public function get right():MovieClip { return _right }
	}
	
}